/*
 * printf_bsp.h
 *
 *  Created on: Dec 8, 2020
 *      Author: Administrator
 */

#ifndef PRINTF_BSP_H_
#define PRINTF_BSP_H_

#include	"main.h"

#define		PRINTF_SYSINFO_SPAN		1000

extern	UART_HandleTypeDef huart4;
extern	UART_HandleTypeDef huart6;

#define		UART4_TRANS_MAX_DELAY	100			//100ms

#define		UART4_TBUF_LEN		128
#define		UART4_RBUF_LEN		128
extern		uint8_t		uart4_t_buff[UART4_TBUF_LEN];
extern		uint8_t		uart4_r_buff[UART4_RBUF_LEN];

#define		UART6_TBUF_LEN		128
#define		UART6_RBUF_LEN		128
extern		uint8_t		uart6_t_buff[UART6_TBUF_LEN];
extern		uint8_t		uart6_r_buff[UART6_RBUF_LEN];

#define		log(...)	printf(__VA_ARGS__)

#define		UART4_RX_IT_LEN_CALLBACK	1
#define		UART6_RX_IT_LEN_CALLBACK	1
#define		DEBUG_PRINT_RX_DATA()		debug_print_rx_data()


void	printf_sysinfo_process(void);

void	debug_print_rx_data(void);

#endif /* PRINTF_BSP_H_ */
